//
//  ViewController.m
//  National flag
//
//  Created by Justsoso on 16/3/9.
//  Copyright © 2016年 Justsoso. All rights reserved.
//

#import "ViewController.h"
#import "CollectionViewController.h"
@interface ViewController ()<CollectionViewControllerDelegate>

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)changeFlag:(FlagModel *)flag
{
    self.imageNameView.image = [UIImage imageNamed:flag.imageName];
    self.nameLabel.text = flag.name;
}

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    CollectionViewController *destVC = segue.destinationViewController;
    destVC.delegate = self;
}

@end
